package com.baidu.controller;

import com.baidu.pojo.TbSpecificationOption;
import com.baidu.service.TbSpecificationOptionService;
import com.baidu.utils.ResultResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/option")
@CrossOrigin
public class TbSpecificationOptionController {
    @Autowired
    TbSpecificationOptionService tbSpecificationOptionService;

    @PostMapping("/list/{id}")
    public ResultResponse findTbSpecificationOption(@PathVariable("id") Integer id){
        List<TbSpecificationOption> tbSpecificationOptionList=tbSpecificationOptionService.findTbSpecificationOption(id);
        return ResultResponse.SUCCESS(tbSpecificationOptionList);
    }
}
